package com.xnx3.banmahuishou.core.entity;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import com.xnx3.j2ee.entity.BaseEntity;

/**
* 抽奖记录表
* @author zxy
*/
@Entity()
@Table(name = "laji_lottery_record")
public class LotteryRecord extends BaseEntity implements java.io.Serializable{
	private Integer id ; //自增id
	private Integer userid ;//用户id,关联user.id
	private Integer addTime ;//抽奖时间,十位数时间戳
	private Integer prizeid ;//奖品id, 关联laji_luck_draw_prize.id
	private String prizename ;//奖品名称,关联laji_luck_draw_prize.name
	private String nickname ;//用户姓名,关联user.nickname
	
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name = "userid", columnDefinition="int(11) COMMENT '用户id,关联user.id' default '0'")
	public Integer getUserid() {
		return userid;
	}
	public void setUserid(Integer userid) {
		this.userid = userid;
	}
	@Column(name = "add_time", columnDefinition="int(11) COMMENT '抽奖时间,十位数时间戳' default '0'")
	public Integer getAddTime() {
		return addTime;
	}
	public void setAddTime(Integer addTime) {
		this.addTime = addTime;
	}
	@Column(name = "prizeid", columnDefinition="int(11)  COMMENT '奖品id, 关联laji_luck_draw_prize.id' default '0'")
	public Integer getPrizeid() {
		return prizeid;
	}
	
	public void setPrizeid(Integer prizeid) {
		this.prizeid = prizeid;
	}
	@Column(name = "prize_name", columnDefinition="char(30) COLLATE utf8mb4_general_ci COMMENT '奖品名称,例如: 重在参与环保, 100积分...' default ''")
	public String getPrizename() {
		return prizename;
	}
	public void setPrizename(String prizename) {
		this.prizename = prizename;
	}
	@Column(name = "nickname", columnDefinition="char(30) COLLATE utf8mb4_general_ci COMMENT '用户姓名,关联user.nickname' default ''")
	public String getNickname() {
		return nickname;
	}
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	@Override
	public String toString() {
		return "LotteryRecord [id=" + id + ", userid=" + userid + ", addTime=" + addTime + ", prizeid=" + prizeid
				+ ", prizename=" + prizename + ", nickname=" + nickname + "]";
	}
	
}
